package Duotai;

public class Cashier {
    private Member member;

    public Member getMember() {
        return member;
    }

//    在Main.java里，传入的参数传到setMember(Member member)的member
    public void setMember(Member member) {
//        this.member = private Member member
        this.member = member;
    }

    public void settlement(){
//        这个 member = this.member = private Member member
        member.buyBook();
//        所以结果是 SuperMember.buyBook() 或者 OrdinaryMember.buyBook()

    }
}
